home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / X11 / XSetErrorHandler.z / XSetErrorHandler
Encoding:
Text File  |  2002-10-03  |  8.2 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XSetErrorHandler, XGetErrorText, XDisplayName,
  10.           XSetIOErrorHandler, XGetErrorDatabaseText - default error
  11.           handlers
  12.  
  13.      SSSSYYYYNNNNTTTTAAAAXXXX
  14.           int (*XSetErrorHandler(_h_a_n_d_l_e_r))()
  15.                 int (*_h_a_n_d_l_e_r)(Display *, XErrorEvent *)
  16.  
  17.           XGetErrorText(_d_i_s_p_l_a_y, _c_o_d_e, _b_u_f_f_e_r__r_e_t_u_r_n, _l_e_n_g_t_h)
  18.                 Display *_d_i_s_p_l_a_y;
  19.                 int _c_o_d_e;
  20.                 char *_b_u_f_f_e_r__r_e_t_u_r_n;
  21.                 int _l_e_n_g_t_h;
  22.  
  23.           char *XDisplayName(_s_t_r_i_n_g)
  24.                 char *_s_t_r_i_n_g;
  25.  
  26.           int (*XSetIOErrorHandler(_h_a_n_d_l_e_r))()
  27.                 int (*_h_a_n_d_l_e_r)(Display *);
  28.  
  29.           XGetErrorDatabaseText(_d_i_s_p_l_a_y, _n_a_m_e, _m_e_s_s_a_g_e,
  30.           _d_e_f_a_u_l_t__s_t_r_i_n_g, _b_u_f_f_e_r__r_e_t_u_r_n, _l_e_n_g_t_h)
  31.                 Display *_d_i_s_p_l_a_y;
  32.                 char *_n_a_m_e, *_m_e_s_s_a_g_e;
  33.                 char *_d_e_f_a_u_l_t__s_t_r_i_n_g;
  34.                 char *_b_u_f_f_e_r__r_e_t_u_r_n;
  35.                 int _l_e_n_g_t_h;
  36.  
  37.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  38.           _b_u_f_f_e_r__r_e_t_u_r_n
  39.                     Returns the error description.
  40.  
  41.           _c_o_d_e      Specifies the error code for which you want to
  42.                     obtain a description.
  43.  
  44.           _d_e_f_a_u_l_t__s_t_r_i_n_g
  45.                     Specifies the default error message if none is
  46.                     found in the database.
  47.  
  48.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  49.  
  50.           _h_a_n_d_l_e_r   Specifies the program's supplied error handler.
  51.  
  52.           _l_e_n_g_t_h    Specifies the size of the buffer.
  53.  
  54.           _m_e_s_s_a_g_e   Specifies the type of the error message.
  55.  
  56.           _n_a_m_e      Specifies the name of the application.
  57.  
  58.           _s_t_r_i_n_g    Specifies the character string.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 10/3/02)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  75.           Xlib generally calls the program's supplied error handler
  76.           whenever an error is received.  It is not called on _B_a_d_N_a_m_e
  77.           errors from _O_p_e_n_F_o_n_t, _L_o_o_k_u_p_C_o_l_o_r, or _A_l_l_o_c_N_a_m_e_d_C_o_l_o_r
  78.           protocol requests or on _B_a_d_F_o_n_t errors from a _Q_u_e_r_y_F_o_n_t
  79.           protocol request.  These errors generally are reflected back
  80.           to the program through the procedural interface.  Because
  81.           this condition is not assumed to be fatal, it is acceptable
  82.           for your error handler to return; the returned value is
  83.           ignored.  However, the error handler should not call any
  84.           functions (directly or indirectly) on the display that will
  85.           generate protocol requests or that will look for input
  86.           events.  The previous error handler is returned.
  87.  
  88.           The _X_G_e_t_E_r_r_o_r_T_e_x_t function copies a null-terminated string
  89.           describing the specified error code into the specified
  90.           buffer.  The returned text is in the encoding of the current
  91.           locale.  It is recommended that you use this function to
  92.           obtain an error description because extensions to Xlib may
  93.           define their own error codes and error strings.
  94.  
  95.           The _X_D_i_s_p_l_a_y_N_a_m_e function returns the name of the display
  96.           that _X_O_p_e_n_D_i_s_p_l_a_y would attempt to use.  If a NULL string is
  97.           specified, _X_D_i_s_p_l_a_y_N_a_m_e looks in the environment for the
  98.           display and returns the display name that _X_O_p_e_n_D_i_s_p_l_a_y would
  99.           attempt to use.  This makes it easier to report to the user
  100.           precisely which display the program attempted to open when
  101.           the initial connection attempt failed.
  102.  
  103.           The _X_S_e_t_I_O_E_r_r_o_r_H_a_n_d_l_e_r sets the fatal I/O error handler.
  104.           Xlib calls the program's supplied error handler if any sort
  105.           of system call error occurs (for example, the connection to
  106.           the server was lost).  This is assumed to be a fatal
  107.           condition, and the called routine should not return.  If the
  108.           I/O error handler does return, the client process exits.
  109.  
  110.           Note that the previous error handler is returned.
  111.  
  112.           The _X_G_e_t_E_r_r_o_r_D_a_t_a_b_a_s_e_T_e_x_t function returns a null-terminated
  113.           message (or the default message) from the error message
  114.           database.  Xlib uses this function internally to look up its
  115.           error messages.  The text in the default_string argument is
  116.           assumed to be in the encoding of the current locale, and the
  117.           text stored in the buffer_return argument is in the encoding
  118.           of the current locale.
  119.  
  120.           The name argument should generally be the name of your
  121.           application.  The message argument should indicate which
  122.           type of error message you want.  If the name and message are
  123.           not in the Host Portable Character Encoding, the result is
  124.           implementation-dependent.  Xlib uses three predefined
  125.           ``application names'' to report errors.  In these names,
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 10/3/02)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.           uppercase and lowercase matter.
  141.  
  142.           XProtoError
  143.                     The protocol error number is used as a string for
  144.                     the message argument.
  145.  
  146.           XlibMessage
  147.                     These are the message strings that are used
  148.                     internally by the library.
  149.  
  150.           XRequest  For a core protocol request, the major request
  151.                     protocol number is used for the message argument.
  152.                     For an extension request, the extension name (as
  153.                     given by _I_n_i_t_E_x_t_e_n_s_i_o_n) followed by a period (.)
  154.                     and the minor request protocol number is used for
  155.                     the message argument.  If no string is found in
  156.                     the error database, the default_string is returned
  157.                     to the buffer argument.
  158.  
  159.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  160.           XOpenDisplay(3X11), XSynchronize(3X11)
  161.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 10/3/02)
  196.  
  197.  
  198.  
  199.